package cn.edu.cqie.maven_onlinexem.serviceImp;

import cn.edu.cqie.maven_onlinexem.bean.Student;
import cn.edu.cqie.maven_onlinexem.dao.studentDao;
import cn.edu.cqie.maven_onlinexem.dao.studentDao;
import cn.edu.cqie.maven_onlinexem.service.StudentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.List;
@Service
public class StudentServiceImp implements StudentService {
    @Autowired
    studentDao studentDao;

    @Override
    public boolean login(Student student) {
        List<Student>  students = studentDao.findStudent(student);
        return students.size()>0;
    }

    @Override
    public List<Student> findAllStudent(Student student) {
        return null;
    }

    @Override
    public void insertStudent(Student student) {
            studentDao.insertStudent(student);
    }

    @Override
    public boolean isFindStudent(Student student) {
        List<Student> students = studentDao.isFindStudent(student);
        return students.size()>0;
    }

    @Override
    public boolean deleteStudent(Student student) {
        return false;
    }

    @Override
    public void updateStudent(Student student) {

    }


}
